<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>智能会话 - 机勘院智能业务系统</title>
    <link href="../lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="../lib/fontawesome/css/all.min.css" rel="stylesheet">
    <link href="../css/main.css" rel="stylesheet">
    <link href="../css/chat.css" rel="stylesheet">
</head>
<body class="deepseek-admin">
    <!-- 顶部导航栏 -->
    <header class="deepseek-header">
        <div class="container-fluid">
            <div class="row align-items-center">
                <div class="col">
                    <button id="sidebarToggle" class="btn btn-link text-white">
                        <i class="fas fa-bars"></i>
                    </button>
                    <span class="ms-2 fw-bold">智能会话</span>
                </div>
                <div class="col-auto">
                    <div class="d-flex align-items-center">
                        <button id="toggleDarkMode" class="btn btn-link text-white me-3" title="切换暗色模式">
                            <i class="fas fa-moon"></i>
                        </button>
                        <div class="dropdown">
                            <button class="btn btn-link text-white dropdown-toggle" data-bs-toggle="dropdown">
                                <i class="fas fa-user-circle"></i>
                            </button>
                            <ul class="dropdown-menu dropdown-menu-end">
                                <li><a class="dropdown-item" href="#"><i class="fas fa-user me-2"></i>个人信息</a></li>
                                <li><a class="dropdown-item" href="#"><i class="fas fa-cog me-2"></i>账号设置</a></li>
                                <li><hr class="dropdown-divider"></li>
                                <li><a class="dropdown-item" href="#"><i class="fas fa-sign-out-alt me-2"></i>退出登录</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </header>

    <!-- 侧边栏 -->
    <nav class="deepseek-sidebar">
        <div class="deepseek-sidebar-content">
            <div class="deepseek-logo mb-4">
                <img src="../images/logo.png" alt="智能业务 Logo">
            </div>
            <ul class="deepseek-nav">
                <li>
                    <a href="#" class="deepseek-nav-item" data-tab="recent-tab">
                        <i class="fas fa-clock"></i>
                        <span>最近会话</span>
                    </a>
                </li>
                <li>
                    <a href="#" class="deepseek-nav-item" data-tab="favorites-tab">
                        <i class="fas fa-star"></i>
                        <span>收藏会话</span>
                    </a>
                </li>
                <li>
                    <a href="#" class="deepseek-nav-item" data-tab="templates-tab">
                        <i class="fas fa-file-alt"></i>
                        <span>会话模板</span>
                    </a>
                </li>
            </ul>
        </div>
    </nav>

    <!-- 主要内容区域 -->
    <main class="deepseek-main">
        <div class="container-fluid py-4">
            <div class="chat-container">
                <!-- 会话历史 -->
                <div class="chat-history mb-4" id="chatHistory">
                    <!-- AI欢迎消息 -->
                    <div class="chat-message ai-message">
                        <div class="message-avatar">
                            <i class="fas fa-robot"></i>
                        </div>
                        <div class="message-content">
                            <div class="message-text">
                                <p>您好！我是机勘院智能业务系统助手。我可以帮您：</p>
                                <ul>
                                    <li>解答道路勘察相关问题</li>
                                    <li>协助文档分析和处理</li>
                                    <li>提供专业技术建议</li>
                                    <li>查询历史项目数据</li>
                                </ul>
                                <p>请问有什么我可以帮您的吗？</p>
                            </div>
                            <div class="message-time">今天 12:00</div>
                        </div>
                    </div>
                </div>

                <!-- 输入区域 -->
                <div class="chat-input-container">
                    <div class="chat-toolbar mb-2">
                        <button class="btn btn-outline-secondary btn-sm" title="上传文件">
                            <i class="fas fa-paperclip"></i>
                        </button>
                        <button class="btn btn-outline-secondary btn-sm" title="插入图片">
                            <i class="fas fa-image"></i>
                        </button>
                        <button class="btn btn-outline-secondary btn-sm" title="录音">
                            <i class="fas fa-microphone"></i>
                        </button>
                        <button class="btn btn-outline-secondary btn-sm" title="清空会话">
                            <i class="fas fa-trash-alt"></i>
                        </button>
                    </div>
                    <div class="input-group">
                        <textarea class="form-control" id="messageInput" rows="3" placeholder="请输入您的问题..."></textarea>
                        <button class="btn btn-primary" type="button" id="sendMessage">
                            <i class="fas fa-paper-plane"></i> 发送
                        </button>
                    </div>
                    <div class="chat-suggestions mt-2">
                        <span class="suggestion-tag" onclick="insertSuggestion(this)">道路勘察方案</span>
                        <span class="suggestion-tag" onclick="insertSuggestion(this)">地质分析报告</span>
                        <span class="suggestion-tag" onclick="insertSuggestion(this)">工程造价估算</span>
                        <span class="suggestion-tag" onclick="insertSuggestion(this)">技术规范查询</span>
                    </div>
                </div>
            </div>
        </div>
    </main>

    <!-- 文件上传模态框 -->
    <div class="modal fade" id="uploadModal" tabindex="-1">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">上传文件</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
                </div>
                <div class="modal-body">
                    <div class="mb-3">
                        <label class="form-label">选择文件</label>
                        <input type="file" class="form-control" id="fileInput" multiple>
                    </div>
                    <div class="upload-preview">
                        <!-- 上传预览区域 -->
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" id="confirmUpload">上传</button>
                </div>
            </div>
        </div>
    </div>

    <!-- JavaScript依赖 -->
    <script src="../lib/jquery/jquery.min.js"></script>
    <script src="../lib/bootstrap/js/bootstrap.bundle.min.js"></script>
    <script src="../js/main.js"></script>
    <script src="../js/chat.js"></script>
    <script src="../js/ai-api.js"></script>
</body>
</html> 